package com.liming.common.pojo.vo.coupon.openfeign;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * @author liming
 * @date 2025/4/1
 */
@Data
@Schema(description = "Feign - 小程序 - 不能使用的优惠券")
public class FeignMiniCannotUseCouponVO implements Serializable {

    @Schema(description = "优惠券ID")
    private Long id;

    @Schema(description = "优惠券名称")
    private String name;

    @Schema(description = "优惠券类型（1 满减券， 2 折扣券）")
    private Integer discountType;

    @Schema(description = "优惠券折扣值")
    private Integer discountAmount;

    @Schema(description = "最低消费金额")
    private Integer minPurchaseAmount;

    @Schema(description = "优惠券开始时间")
    private LocalDateTime startDate;

    @Schema(description = "优惠券结束时间")
    private LocalDateTime endDate;

    @Schema(description = "优惠券描述")
    private String description;

    @Schema(description = "不能使用的原因")
    private String reason;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FeignMiniCannotUseCouponVO that = (FeignMiniCannotUseCouponVO) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
